#ifndef STRINGTOOLS_H_
#define STRINGTOOLS_H_

#include "String.h"
#include <stdlib.h>

class StringTools
{
public:
	static uchar* toNativeString(String& in)
	{
		uchar* ret = new uchar[in.count + 2];

		for(natural i = 0; i < in.count; i++)
			(ret)[i] = in.getManagedMemoryData()[in.offset + i];

		(ret)[in.count] = L'\0';

		return ret;
	}
};

#endif /* ARRAYTOOLS_H_ */
